package com;

import com.mycanvas.AlabCanvas;
import com.mycanvas.AllPv;
import com.mycanvas.MyCanvas;

import java.util.List;

import javax.swing.JFrame;

public class MainCanvas {

    private JFrame jShowFrame;


    public void showAllView(List<AllPv> list, int charHeight) {
        jShowFrame = new JFrame();
        jShowFrame.setBounds(500, 500, 5000, 5000);
        jShowFrame.setLayout(null);

        MyCanvas myCanvas = new MyCanvas(list, charHeight);//画布
        myCanvas.setBounds(0, 0, 5000, 20000);
        jShowFrame.add(myCanvas);
        jShowFrame.setVisible(true);
    }


    private JFrame jExampleFrame;

    public void showExampleView(List<AllPv> list){
        jExampleFrame = new JFrame();
        jExampleFrame.setBounds(500, 500, 5000, 5000);
        jExampleFrame.setLayout(null);

        AlabCanvas alabCanvas = new AlabCanvas(list);
        alabCanvas.setBounds(0, 0, 5000, 20000);
        jExampleFrame.add(alabCanvas);
        jExampleFrame.setVisible(true);

    }



}
